package com.ruoyi.common.core.enums;

import com.fasterxml.jackson.annotation.JsonValue;

/**
 * @Author: hungerL
 * @Date: 2022/8/13 12:34
 * @Description: 响应状态枚举类
 **/
public enum HttpResponseEnum {

    /**              成功枚举类                           **/
    USER_REGISTRATION_SUCCESS(200,"用户注册成功",BusinessType.OPERATION),
    USER_LOGIN_SUCCESS(200,"用户登陆成功",BusinessType.OPERATION),
    OPERATION_SUCCESS(200,"业务操作成功",BusinessType.OPERATION),
    PAY_SUCCESS(200,"支付成功",BusinessType.OPERATION),

    /***             失败枚举类                           **/
    USER_REGISTRATION_FAILED(500,"用户注册失败",BusinessType.OPERATION),
    USERS_HAVE_REGISTERED(500,"该用户已经注册",BusinessType.OPERATION),
    USERS_LDAP_FAILED(500,"LDAP登录认证失败",BusinessType.OPERATION),
    USER_NOT_EXIST(500,"用户不存在",BusinessType.OPERATION),
    PASSWORD_IS_INCORRECT(500,"密码不正确",BusinessType.OPERATION),
    CURRENT_USER_STATE_IS_FROZEN_STATE(500,"当前用户处于冻结状态，无法登陆",BusinessType.OPERATION),
    CODE_NOT_EXISTS(500,"验证码不存在或不正确",BusinessType.OPERATION);


    public int code;
    @JsonValue
    public String msg;
    public BusinessType tag;

    HttpResponseEnum(int code, String msg, BusinessType tag) {
        this.code = code;
        this.msg = msg;
        this.tag = tag;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public BusinessType getTag() {
        return tag;
    }

    public void setTag(BusinessType tag) {
        this.tag = tag;
    }

}
